package study.actorOf

import java.util.Date

import akka.actor.{ActorRef, ActorSystem, Props}
import study.msg.{Run, RunTask}

/**
 * @Description: TODO
 * @Author: DJJ
 * @Date: 2019/12/12 15:42
 */
object ActorTest extends App {
  private val shoppingCart = ActorSystem("ActorTest")
  private val test1: ActorRef = shoppingCart.actorOf(Props[ShoppingCart],"TEST1")
//  private val test2: ActorRef = shoppingCart.actorOf(Props[Shop],"TEST2")
  test1 ! Run("hello")
  test1 ! RunTask(new Date())
}
